home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 3 / Amiga Format CD03 (1996-07-04)(Future Publishing)(GB)(Track 1 of 6)[!][issue 1996-08].iso / comms / netsoftware / archie38_1.lha / archie-1.4 / pmachine.h < prev    next >
C/C++ Source or Header  |  1995-01-04  |  3KB  |  156 lines

  1. /*
  2.  * This is where we drop in the various dependencies for different systems.
  3.  * Someday this might be remotely complete.
  4.  *
  5.  * I kept the name pmachine.h because it was already in all of the files...this
  6.  * barely resembles the pmachine.h that comes with the real Prospero, though.
  7.  *
  8.  * $Revision: 1.11 $
  9.  */
  10.  
  11. #ifdef u3b2
  12. # define USG
  13. # define NOREGEX
  14. # define MAXPATHLEN 1024       /* There's no maxpathlen in any 3b2 .h file.  */
  15. #endif
  16.  
  17. #ifdef m88k
  18. #define MAXPATHLEN 1024
  19. #endif
  20.  
  21. #ifdef hpux
  22. # ifndef bcopy
  23. #  define FUNCS            /* HP/UX 8.0 has the fns.  */
  24. # endif
  25. # define NOREGEX
  26. # define NEED_STRING_H
  27. #endif
  28.  
  29. /* These are required for a Sequent running Dynix/PTX, their SysV variant.
  30.    Archie builds fine untouched on a system running their BSD-based OS.  */
  31. #ifdef _SEQUENT_
  32. # define NOREGEX
  33. # define USG
  34. #endif
  35.  
  36. #if defined(USG) || defined(SYSV)
  37. # define FUNCS
  38. #endif
  39.  
  40. #ifdef ISC
  41. # define FUNCS
  42. # define STRSPN
  43. # define NOREGEX
  44. #endif
  45.  
  46. #ifdef PCNFS
  47. # define FUNCS
  48. # define NEED_STRING_H
  49. #ifndef MSDOS
  50. # define MSDOS
  51. #endif
  52. #endif
  53.  
  54. #ifdef CUTCP
  55. # define FUNCS
  56. # define NOREGEX
  57. # define NEED_STRING_H
  58. # define SELECTARG int
  59. # ifndef MSDOS
  60. #  define MSDOS
  61. # endif
  62. #endif
  63.  
  64. #ifdef _AUX_SOURCE
  65. # define AUX
  66. # define NOREGEX
  67. # define NBBY 8    /* Number of bits in a byte.  */
  68. typedef long Fd_mask;
  69. # define NFDBITS (sizeof(Fd_mask) * NBBY)    /* bits per mask */
  70. #endif
  71.  
  72. #ifdef OS2
  73. # define NOREGEX
  74. # include <pctcp.h>
  75. #endif
  76. #ifdef MSDOS
  77. # define USG
  78. # define NOREGEX
  79. # include <string.h>
  80. # include <stdlib.h>
  81. #endif
  82.  
  83. #ifdef _AIX
  84. # ifdef u370
  85. #  define FUNCS
  86. # endif /* AIX/370 */
  87. # define _NONSTD_TYPES
  88. # define _BSD_INCLUDES
  89. # define NEED_STRING_H
  90. # define NEED_SELECT_H
  91. # define NEED_TIME_H
  92. #endif
  93.  
  94. #ifdef AMIGA
  95. # define NOREGEX
  96. # include <string.h>
  97. # include <stdlib.h>
  98. #endif
  99.  
  100. /* General problems.  */
  101.  
  102. #ifdef FUNCS
  103. # define index        strchr
  104. /* According to mycroft@gnu.ai.mit.edu. */
  105. # ifdef _IBMR2
  106. char *strchr();
  107. # endif
  108. # define rindex        strrchr
  109. # ifndef _AUX_SOURCE
  110. #  define bcopy(a,b,n)    memcpy(b,a,n)
  111. #  define bzero(a,n)    memset(a,0,n)
  112. # ifdef _IBMR2
  113. char *memset();
  114. # endif
  115. # endif
  116. #endif
  117.  
  118. #if defined(_IBMR2) || defined(_BULL_SOURCE)
  119. # define NEED_SELECT_H
  120. #endif
  121. #if defined(USG) || defined(UTS)
  122. # define NEED_STRING_H
  123. #endif
  124. #if defined(USG) || defined(UTS) || defined(_AUX_SOURCE)
  125. # define NEED_TIME_H
  126. # ifdef UTS
  127. #  define WANT_BOTH_TIME
  128. # endif
  129. #endif
  130.  
  131. #ifdef VMS
  132. /* Get the system status stuff.  */
  133. # include <ssdef.h>
  134. #endif /* VMS */
  135.  
  136. /*
  137.  * FD_SET: lib/pfs/dirsend.c, user/vget/ftp.c
  138.  */
  139. #ifndef CUTCP
  140.  
  141. #define SELECTARG fd_set
  142. #if !defined(FD_SET) && !defined(VMS) && !defined(NEED_SELECT_H)
  143. #define    FD_SETSIZE    32
  144. #define    FD_SET(n, p)    ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
  145. #define    FD_CLR(n, p)    ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
  146. #define    FD_ISSET(n, p)    ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
  147. #undef FD_ZERO
  148. #define FD_ZERO(p)    bzero((char *)(p), sizeof(*(p)))
  149. #endif
  150.  
  151. #endif /* not CUTCP */
  152.  
  153. #ifndef MAXPATHLEN
  154. #define MAXPATHLEN 1024
  155. #endif
  156.